package service.impl;

import dao.DoctorWorkMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.DoctorWork;
import service.DoctorWorkService;

import java.util.List;

@Service
public class DoctorWorkServiceImpl implements DoctorWorkService {
    @Autowired
    private DoctorWorkMapper doctorWorkMapper;

    @Override
    public List<DoctorWork> findAll() {
        return doctorWorkMapper.findAll();
    }

    @Override
    public DoctorWork findByDocIdAndDay(String docId, String day) {
        return doctorWorkMapper.findByDocIdAndDay(docId, day);
    }

    @Override
    public int add(DoctorWork doctorWork) {
        return doctorWorkMapper.add(doctorWork);
    }

    @Override
    public int update(DoctorWork doctorWork) {
        return doctorWorkMapper.update(doctorWork);
    }

    @Override
    public int delete(String docId, String day) {
        return doctorWorkMapper.delete(docId, day);
    }
    @Override
    public List<DoctorWork> findByDocId(String docId) {
        return doctorWorkMapper.findByDocId(docId);
    }
}